<div class="layuimini-container">
    <div class="layuimini-main">
        <table id="currentTable" class="layui-table layui-hide"
               data-auth-preview="{:auth('finace.offlinewithdrawals/preview')}"
               data-auth-edit="{:auth('admins.feedback/edit')}"
               lay-filter="currentTable">
        </table>
    </div>
</div>

<script type="text/javascript">

    require(["jquery", "easy-admin"], function ($, ea) {

        var init = {
            table_elem: '#currentTable',
            table_render_id: 'currentTableRenderId',
            index_url: 'finace.offlinewithdrawals/index',
            edit_url: 'finace.offlinewithdrawals/edit',
            modify_url: 'finace.offlinewithdrawals/modify',
            export_url: 'finace.offlinewithdrawals/export',
            preview_url: 'finace.offlinewithdrawals/preview'
        };


        ea.table.render({
            init: init,
            toolbar: ['refresh', 'export',],
            cols: [[
                {field: 'id', minWidth: 200, title: 'ID',sort: true},
                {field: 'uid', minWidth: 200, title: '会员id'},
                {field: 'pay_id', minWidth: 200, title: '线下提现方式',search: 'select', selectList: { 0: '微信',1:'支付宝'}},
                {field: 'money', minWidth: 200, title: '提现金额'},
                {field: 'procedure', minWidth: 200, title: '手续费'},
                {field: 'alipaystates', minWidth: 80, title: '收款码/账号名称',search: 'select', selectList: { 0: '收款码',1:'账号名称'}},
                {field: 'state', minWidth: 80, title: '提现状态',search: 'select', selectList: { 0: '待审核',1:'提现成功',2:'提现失败',3:'退款'}},
                {field: 'thumb', minWidth: 80, title: '图片', search: false, templet: ea.table.image},
                {field: 'create_time', minWidth: 80, title: '创建时间', search: 'range',sort: true},
                {
                    width: 180,
                    title: '操作',
                    templet: ea.table.tool,
                    operat: [
                        [{
                            text: '查看',
                            url: init.edit_url,
                            method: 'open',
                            auth: 'edit',
                            class: 'layui-btn layui-btn-xs layui-btn-success',
                            extend: 'data-full="true"',
                        }],
                    ]
                }

            ]],
        });

        ea.listen();

    });
</script>